<?php

namespace app\api\controller\market;

use app\api\BaseController;
use app\api\service\CouponService;

class CouponController extends BaseController
{
    public function index()
    {
        $store_id = $this->request->param('store_id/d');

        if (empty($store_id)){
            return json(['code' => 0, 'msg' => '非法参数!']);
        }

        $couponList = CouponService::getCouponList($store_id);

        return  json(['code' =>1,'data' => $couponList,'msg' => '请求成功!']);
    }
}